package cn.enilu.flash.service.shop;

import cn.enilu.flash.bean.entity.shop.Label;
import cn.enilu.flash.dao.shop.LabelRepository;
import cn.enilu.flash.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LabelService extends BaseService<Label,Long, LabelRepository> {
    @Autowired
    private LabelRepository labelRepository;

    public List<Label> queryAllSort(){
        Sort sort = Sort.by(Sort.Direction.DESC,"recommend");
        return labelRepository.findAll(sort);
    }
}
